@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />
@endsection

@section('html-body')
    <!-- content start -->
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">转诊列表</a>
        </div>
        <!-- cur-position end -->

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>编号</th>
                    <th>病人姓名</th>
                    <th>联系方式</th>
                    <th>转诊医院</th>
                    <th>转诊医生</th>
                    <th>转诊费用</th>
                    <th>病人是否支付</th>
                    <th>支付时间</th>
                    <th>订单编号</th>
                </tr>
                </thead>
                <tbody id="fansinfo">
                @if($referrals && count($referrals) > 0)
                    @foreach($referrals as $referral)
                        <tr>
                            <td>{{$referral->id}}</td>
                            <td>@if($referral->user_info){{$referral->user_info->realname}}@endif</td>
                            <td>@if($referral->user_info){{$referral->user_info->phone}}@endif</td>
                            <td>@if($referral->doctor_info){{$referral->doctor_info->hospital_name}}@endif【转】@if($referral->redoctor_info){{$referral->redoctor_info->hospital_name}}@endif</td>
                            <td>@if($referral->doctor_info){{$referral->doctor_info->doc_name}}@endif【转】@if($referral->redoctor_info){{$referral->redoctor_info->doc_name}}@endif</td>
                            <td>@if($referral->order_info)@if($referral->order_info->ispay == 1)<span style="color: green;">已支付</span>@else未支付 @endif @else未支付@endif</td>
                            <td>@if($referral->order_info){{$referral->order_info->pay_time}} @endif</td>
                            <td>{{$referral->order_num}}</td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
        </div>
        <div>
            {!! $referrals->render() !!}
        </div>
    </div>
    <!-- content end -->
    <script type="text/javascript">

        $(function() {
        });
    </script>
@endsection